<ul class="nav nav-pills nav-stacked sidebar">
  <li role="presentation" class="head" ng-class="{active:state=='admin.elections'}">
    <a ui-sref="admin.elections()" ng-i18next="avAdmin.sidebar.elections">Elections</a> </li>

  <li role="presentation" class="sub1">
    <a ui-sref="admin.new()"> <i class="fa-fw fa fa-plus-circle"></i> <span ng-i18next="avAdmin.sidebar.newel"></span></a> </li>
  <li role="presentation" class="sub1" ng-class="{active:state=='admin.import'}">
    <a ui-sref="admin.import()"> <i class="fa-fw fa fa-upload"></i> <span ng-i18next="avAdmin.sidebar.import"></span></a> </li>

  <ul class="nav nav-pills nav-stacked" ng-if="current">
    <li role="presentation" class="head"><a ui-sref="admin.dashboard({id:current.id})">
        <span ng-if="current.title" ng-i18next="avAdmin.sidebar.currentel"></span> <span class="label label-success">{{ current.title|truncate:20 }}</span></a></li>
    <li role="presentation" class="sub1" ng-class="{active:state=='admin.dashboard'}" ng-if="current.id">
      <a ui-sref="admin.dashboard({id:current.id})"> <i class="fa-fw fa fa-dashboard"></i> <span ng-i18next="avAdmin.sidebar.dashboard"></span></a> </li>

    <li role="presentation" class="sub1" ng-class="{active:state == 'admin.'+l.name}" ng-repeat="l in sidebarlinks">
      <a ui-sref="{{ 'admin.'+l.name+'({id:current.id})' }}">
        <i class="fa-fw fa fa-{{ l.icon }}"></i>
        <span ng-i18next="avAdmin.sidebar.{{ l.name }}"></span>
      </a>
     </li>
  </ul>

  <!-- plugins -->
    <li role="presentation" ng-class="{active:state == 'admin.'+p.name, head:p.head, sub1:!p.head}" ng-repeat="p in plugins.list">
      <a ui-sref="{{ p.link }}">
        <span ng-if="p.menu.html" ng-bind-html="p.menu.html()"></span>
        <span ng-if="!p.menu.html">
            <i class="fa-fw fa fa-{{ p.menu.icon }}" ng-if="p.menu.icon"></i>
            <span ng-i18next>{{ p.menu.text }}</span>
        </span>
      </a>
    </li>
  <!-- endof plugins -->

  <!-- not implemented yet
  <li role="presentation" class="head" ng-class="{active:state=='admin.account'}">
    <a ui-sref="admin.account()"> <i class="fa-fw fa fa-user"></i> <span ng-i18next="avAdmin.sidebar.myAccount"></span></a> </li>
  <li role="presentation" class="sub1" ng-class="{active:state=='admin.billinfo'}">
    <a ui-sref="admin.billinfo()"> <i class="fa-fw fa fa-credit-card"></i> <span ng-i18next="avAdmin.sidebar.billinfo"></span></a> </li>
  <li role="presentation" class="sub1" ng-class="{active:state=='admin.billhistory'}">
    <a ui-sref="admin.billhistory()"> <i class="fa-fw fa fa-history"></i> <span ng-i18next="avAdmin.sidebar.billhistory"></span></a> </li>
  <li role="presentation" class="sub1"><a href="#"> <i class="fa-fw fa fa-dollar"></i> <span ng-i18next="avAdmin.sidebar.buy"></span></a></li>
  -->
</ul>
